package coredto

import (
	"core/coreinfo"
	"core/corestruct"
	"core/coreutil"
	"reflect"
)

type LoginDto struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Ename    string            `json:"ename"                            gorm:"column:ename;DEFAULT:'';not null;comment:用户名;"`
	Pwd      string            `json:"pwd"                              gorm:"column:pwd;DEFAULT:'';not null;comment:密码;"`
	HtplatId int64             `json:"htplatId,string"                    gorm:"column:htplat_id;DEFAULT:0;not null;comment:平台编号;"`
	HtdeptId int64             `json:"htdeptId,string"                    gorm:"column:htdept_id;DEFAULT:0;not null;comment:结构编号;"`
	Loginway string            `json:"loginway"                         gorm:"column:loginway;DEFAULT:'';not null;comment:登录方式;memo:网站、小程序、安卓终端;"`
	YzmId    string            `json:"yzmId"                            gorm:"column:yzm_id;DEFAULT:'';not null;comment:验证码ID;"`
	YzmValue string            `json:"yzmValue"                         gorm:"column:yzm_value;DEFAULT:'';not null;comment:验证码;"`
	Extra    map[string]string `json:"extra"                            gorm:"column:extra;DEFAULT:'';not null;comment:额外信息;"`
}

func LoginDtoInit() {
	var mcls = &LoginDto{}
	var m = &corestruct.MyClass{
		Name:     "登录Dto",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}
